package com.kaibes.platform.member.db;

import java.time.LocalDate;

import com.kaibes.core.base.annotation.Description;

import lombok.Data;

/**
CREATE TABLE `member` (
  `id` INTEGER NOT NULL AUTO_INCREMENT,
  `user_id` INTEGER,
  `experience` INTEGER NOT NULL DEFAULT 0,
  `vip_id` TINYINT UNSIGNED,
  `expiration` DATE,
  PRIMARY KEY (`id`),
  FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE,
  FOREIGN KEY (`vip_id`) REFERENCES `member_vip` (`id`) ON DELETE CASCADE
) ENGINE=INNODB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
 */
@Data
@Description("会员")
public class Member {
    @Description("会员ID")
    private Integer id;
    @Description("用户ID")
    private Integer userId;
    @Description("会员经验值")
    private Integer experience;
    @Description("VIP ID")
    private Short vipId;
    @Description("有效时间")
    private LocalDate expiration;
}
